import {createRouter, createWebHistory} from 'vue-router'
import {routes} from 'vue-router/auto-routes'

// 目录结构即路由：https://github.com/posva/unplugin-vue-router
/*
eg:
    src/pages/index.vue => /
    src/pages/about.vue => /about
    src/pages/users/index.vue => /users
    src/pages/users/profile.vue => /users/profile
    src/pages/users/[id].vue => /users/:id
    src/pages/[user]/settings.vue => /:user/settings
    src/pages/[...notFound].vue => 404 路由
 */
const router = createRouter({
    history: createWebHistory(),
    routes: [
        ...routes,
        // 自定义路由 TODO
    ]
})
export default router